package com.wu.store.common.util;

import com.github.pagehelper.PageInfo;
import com.wu.store.entity.PageResult;

import java.util.List;

public class PageUtils {
	public static PageResult getPageResult( PageInfo<?> pageInfo) {
		PageResult pageResult = new PageResult();
		pageResult.setPage(pageInfo.getPageNum());
		pageResult.setSize(pageInfo.getPageSize());
		pageResult.setTotal(pageInfo.getTotal());
		pageResult.setContent(pageInfo.getList());
		return pageResult;
	}
}
